package com.mayikt.main.api.impl.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mayikt.main.api.impl.entity.SysUserLoginLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author taotao
 * @since 2022-04-30
 */
public interface SysUserLoginLogMapper extends BaseMapper<SysUserLoginLog> {

    @Insert("<script>INSERT INTO `sys_admin`.`sys_user_login_log` (`user_id`, `login_ip`, `login_time`, `login_token`, `channel`, `equipment`, `is_Delete`, `message_id`)  values " +
            "<foreach collection='list' item='c' separator=','>(#{c.userId},#{c.loginIp},#{c.loginTime},#{c.loginToken},#{c.channel},#{c.equipment},#{c.isDelete},#{c.messageId})</foreach></script>")
    int batchInsert(@Param("list") List<SysUserLoginLog> sysUserLoginLogs);
}
